package org.coderk.mybatis.mapper;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.coderk.mybatis.dto.UserRole;
import org.coderk.mybatis.model.User;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 谭景玉
 */
@Repository
public interface UserMapper {
//    @Select("select * from user")
    List<User> selectAll();

    List<UserRole> selectAllWithRoleMode1();

    List<UserRole> selectAllWithRoleMode2();

    @Update("UPDATE user SET name = '王吉' WHERE password = #{password}")
    int update(String password);
}
